<html>
<head>
  <title>04-InnoDB记录存储结构</title>
  <basefont face="微软雅黑" size="2" />
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  <meta name="exporter-version" content="YXBJ Windows/600646 (zh-CN, DDL); Windows/6.1.1 (Win64);"/>
  <meta name="content-class" content="yinxiang.markdown"/>
  <style>
    body, td {
      font-family: 微软雅黑;
      font-size: 10pt;
    }
  </style>
</head>
<body>
<a name="623"/>
<h1>04-InnoDB记录存储结构</h1>

<div><span><div style="font-size: 14px; margin: 0; padding: 0; width: 100%;"><h2 style="line-height: 160%; box-sizing: content-box; font-weight: 700; font-size: 34px; border-bottom: 1px solid #dbdbdb; color: #333;">InnoDB记录存储结构</h2>
<h3 style="line-height: 160%; box-sizing: content-box; font-weight: 700; font-size: 27px; color: #333;">记录格式概述</h3>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">InnoDB是一个将表中的数据存储到磁盘上的存储引擎，InnoDB将数据划分为若干页，以页作为磁盘和内存之间交互的基本单位，InnoDB中页的大小一般为16KB。也就是在一般情况下，一次最少从磁盘中读取16KB的内容到内存中，一次最少把内存中的16KB内容刷新到磁盘中。</p>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">记录在磁盘上的存放方式也被称为<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">行格式</strong>或者<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">记录格式</strong>。MySQL中设计了4种不同类型的<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">行格式</strong>，分别是<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">Compact</strong>、<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">Redundant</strong>、<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">Dynamic</strong>和<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">Compressed</strong>行格式（以后也许会设计更多的行格式）；</p>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;"><strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">指定行格式的语法：</strong> 可以在创建或修改表的语句中指定行格式<br/>
CREATE TABLE 表名（列信息） <strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">ROW_FORMAT</strong>=行格式名称；<br/>
ALTER TABLE 表名 <strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">ROW_FORMAT</strong>=行格式名称；</p>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">由于Redundant行格式比较老，这里就不说了，主要看其他3种：</p>
<h3 style="line-height: 160%; box-sizing: content-box; font-weight: 700; font-size: 27px; color: #333;">1. COMPACT行格式</h3>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;"><img src="04-InnoDB记录存储结构_files/compact.jpg" type="image/jpeg" data-filename="compact.jpg"/><br/>
Compact行格式中，一条完整的记录其实可以被分为<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">记录的额外信息</strong>和<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">记录的真实数据</strong>两大部分。</p>
<h4 style="line-height: 160%; box-sizing: content-box; font-size: 20px; color: #333;">1-1 记录的额外信息</h4>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">这部分信息是服务器为了描述这条记录而不得不额外添加的一些信息，这些额外信息分为3类：</p>
<ul style="line-height: 160%; box-sizing: content-box; display: block; list-style-type: disc; padding-left: 30px; margin: 6px 0 10px; color: #333;">
<li style="line-height: 160%; box-sizing: content-box; position: relative;">变长字段长度列表</li>
<li style="line-height: 160%; box-sizing: content-box; position: relative;">NULL值列表</li>
<li style="line-height: 160%; box-sizing: content-box; position: relative;">记录头信息</li>
</ul>
<h5 style="line-height: 160%; box-sizing: content-box; font-weight: 700; font-size: 16px; color: #333;">1-1-1 变长字段长度列表</h5>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">在Compact行格式中，把所有变长字段的真实数据占用的<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">字节长度</strong>都存放在记录的开头位置，从而形成一个变长字段长度列表，<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">各变长字段数据占用的字节数按照列的顺序逆序存放</strong>，再强调一遍，是逆序！<br/>
另外需要注意的一点是，<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">变长字段长度列表中只存储值为 非NULL 的列内容占用的长度，值为 NULL的列的长度是不储存的.</strong></p>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;"><strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">另外，额外需要注意的是</strong>，对于CHAR（M）类型，如果使用变长字符集编码，如gbk，utf-8等，那么该列也属于变长字段，所占用的字节数，同样也会加入到变长字段长度列表中。如果使用是定长字符集编码，如ascii、ios-8859-1，则为不会加入到该列表。</p>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">对于一个变长字段，Compact行格式使用1~2个字节来存储该变长字段占用的字节数（字节长度），那什么时候使用1个字节，什么时候使用2个字节呢？规则如下：</p>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;"><strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">首先声明一下W、M和L的意思：</strong></p>
<ol style="line-height: 160%; box-sizing: content-box; display: block; padding-left: 30px; margin: 6px 0 10px; color: #333; list-style-type: decimal;">
<li style="line-height: 160%; box-sizing: content-box;">假设某个字符集中表示一个字符最多需要使用的字节数为W，也就是使用SHOW CHARSET语句的结果中的Maxlen列，比方说utf8字符集中的W就是3，gbk字符集中的W就是2，ascii字符集中的W就是1。</li>
<li style="line-height: 160%; box-sizing: content-box;">对于变长类型VARCHAR(M)来说，这种类型表示能存储最多M个字符（注意是字符不是字节），所以这个类型能表示的字符串最多占用的字节数就是M×W。</li>
<li style="line-height: 160%; box-sizing: content-box;">假设它实际存储的字符串占用的字节数是L。</li>
</ol>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">InnoDB在读记录的变长字段长度列表时先查看表结构，然后判断某变长字段长度是用1字节表示还是2字节表示；<br/>
<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">使用1个字节还是2个字节表示真正字符串占用的字节数的规则：</strong></p>
<ul style="line-height: 160%; box-sizing: content-box; display: block; list-style-type: disc; padding-left: 30px; margin: 6px 0 10px; color: #333;">
<li style="line-height: 160%; box-sizing: content-box; position: relative;">如果M×W &lt;= 255，那么使用1个字节来表示真正字符串占用的字节数。</li>
<li style="line-height: 160%; box-sizing: content-box; position: relative;">如果M×W &gt; 255，则分为两种情况：<br/>
a. 如果 L &lt;= 127，则用1个字节来表示真正字符串占用的字节数<br/>
b. 如果 L &gt; 127，则用2个字节来表示真正字符串占用的字节数<br/>
<img src="04-InnoDB记录存储结构_files/未命名1556268724.png" type="image/png" data-filename="未命名1556268724.png"/></li>
</ul>
<h5 style="line-height: 160%; box-sizing: content-box; font-weight: 700; font-size: 16px; color: #333;">1-1-2 NULL值列表</h5>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">某些列可能存储NULL值，如果把这些NULL值都放到记录的真实数据中存储会很占地方，所以Compact行格式把这些值为NULL的列统一管理起来，存储到NULL值列表中，它的处理过程是这样的：</p>
<ol style="line-height: 160%; box-sizing: content-box; display: block; padding-left: 30px; margin: 6px 0 10px; color: #333; list-style-type: decimal;">
<li style="line-height: 160%; box-sizing: content-box;">
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">首先统计表中允许存储NULL的列有哪些：<br/>
主键列、被NOT NULL修饰的列都是不可以存储NULL值的，所以在统计的时候不会把这些列算进去；</p>
</li>
<li style="line-height: 160%; box-sizing: content-box;">
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">如果表中没有允许存储 NULL 的列，则 NULL值列表 也不存在了，<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">否则将每个允许存储NULL的列对应一个二进制位，二进制位按照列的顺序逆序排列</strong>，二进制位表示的意义如下：<br/>
a. 二进制的值为1时，代表该列的值为NULL；<br/>
b. 二进制的值为0时，代表该列的值不为NULL；</p>
</li>
<li style="line-height: 160%; box-sizing: content-box;">
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">MySQL规定NULL值列表必须用整数个字节的位表示，如果使用的二进制位个数不是整数个字节，则在字节的高位补0。</p>
</li>
</ol>
<h5 style="line-height: 160%; box-sizing: content-box; font-weight: 700; font-size: 16px; color: #333;">1-1-3 记录头信息</h5>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;"><strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">记录头信息，是由固定的5个字节组成。5个字节也就是40个二进制位，不同的位代表不同的意思，如图：</strong><br/>
<img src="04-InnoDB记录存储结构_files/1.jpg" type="image/jpeg" data-filename="1.jpg"/><br/>
<img src="04-InnoDB记录存储结构_files/1 [1].jpg" type="image/jpeg" data-filename="1.jpg"/></p>
<h4 style="line-height: 160%; box-sizing: content-box; font-size: 20px; color: #333;">1-2 记录的真实数据</h4>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">记录的真实数据除了用户自定义的列的数据以外，MySQL会为每个记录默认添加一些列（也称为<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">隐藏列</strong>），具体的列如下：</p>
<table style="margin: 2px 0 14px; color: #333; width: auto; border-collapse: collapse; box-sizing: border-box;"><thead style="line-height: 160%; box-sizing: content-box;"><tr style="line-height: 160%; box-sizing: content-box;"><th style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #72777b; border-top: 0; background-color: #7b8184; font-weight: 300; color: #fff; padding-top: 6px;">列名</th><th style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #72777b; border-top: 0; background-color: #7b8184; font-weight: 300; color: #fff; padding-top: 6px;">是否必须</th><th style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #72777b; border-top: 0; background-color: #7b8184; font-weight: 300; color: #fff; padding-top: 6px;">占用空间</th><th style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #72777b; border-top: 0; background-color: #7b8184; font-weight: 300; color: #fff; padding-top: 6px;">描述</th></tr></thead><tbody style="line-height: 160%; box-sizing: content-box;"><tr style="line-height: 160%; box-sizing: content-box;"><td style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #eaeaea;">DB_ROW_ID</td><td style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #eaeaea;">否</td><td style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #eaeaea;">6字节</td><td style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #eaeaea;">行ID，唯一标识一条记录</td></tr><tr style="line-height: 160%; box-sizing: content-box;"><td style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #eaeaea;">DB_TRX_ID</td><td style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #eaeaea;">是</td><td style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #eaeaea;">6字节</td><td style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #eaeaea;">事务ID</td></tr><tr style="line-height: 160%; box-sizing: content-box;"><td style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #eaeaea;">DB_ROLL_PTR</td><td style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #eaeaea;">是</td><td style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #eaeaea;">7字节</td><td style="line-height: 160%; box-sizing: content-box; padding: 5px 14px 5px 12px; border: 1px solid #eaeaea;">回滚指针</td></tr></tbody></table>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">InnoDB表对主键的生成策略：优先使用用户自定义主键作为主键，如果用户没有定义主键，则选取一个非空的Unique键作为主键，如果表中连Unique键都没有定义的话，则InnoDB会为表默认添加一个名为DB_ROW_ID的隐藏列作为主键。所以从上表中可以看出：InnoDB存储引擎会为每条记录都添加 DB_TRX_ID 和 DB_ROLL_PTR 这两个列，但是 DB_ROW_ID 是可选的（在没有自定义主键以及非空的Unique键的情况下才会添加该列）。</p>
<ol style="line-height: 160%; box-sizing: content-box; display: block; padding-left: 30px; margin: 6px 0 10px; color: #333; list-style-type: decimal;">
<li style="line-height: 160%; box-sizing: content-box;">对于变长字段，存储的是记录的实际数据；</li>
<li style="line-height: 160%; box-sizing: content-box;">对于定长字段类型，如CHAR（M），除了存储实际数据外，未占满的要补空格；</li>
<li style="line-height: 160%; box-sizing: content-box;">真实记录处不存储值为NULL的列值（这些列值存储到了NULL值列表）；</li>
</ol>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">变长字符集的CHAR(M)类型的列要求至少占用M个字节，而VARCHAR(M)却没有这个要求。比方说对于使用utf8字符集的CHAR(10)的列来说，该列存储的数据字节长度的范围是10～30个字节。即使我们向该列中存储一个空字符串也会占用10个字节，这是怕将来更新该列的值的字节长度大于原有值的字节长度而小于10个字节时，可以在该记录处直接更新，而不是在存储空间中重新分配一个新的记录空间，导致原有的记录空间成为所谓的碎片。</p>
<h3 style="line-height: 160%; box-sizing: content-box; font-weight: 700; font-size: 27px; color: #333;">2. Dynamic行格式和Compressed行格式</h3>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;"><strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">MySQL版本是5.7，它的默认行格式就是Dynamic</strong>，这俩行格式和Compact行格式挺像，只不过在处理行溢出数据时有点儿分歧，它们不会在记录的真实数据处存储字段真实数据的前768个字节，而是把所有的字节都存储到其他页面中，只记录的真实数据处存储其他页面的地址，就像这样：<br/>
<img src="04-InnoDB记录存储结构_files/1 [2].jpg" type="image/jpeg" data-filename="1.jpg"/></p>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">Compressed行格式和Dynamic不同的一点是，Compressed行格式会采用压缩算法对页面进行压缩，以节省空间。</p>
<h3 style="line-height: 160%; box-sizing: content-box; font-weight: 700; font-size: 27px; color: #333;">3. 行溢出数据</h3>
<h4 style="line-height: 160%; box-sizing: content-box; font-size: 20px; color: #333;">3-1 VARCHAR（M）最多能存储的数据</h4>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">MySQL<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">对一条记录占用的最大存储空间是有限制的</strong>，除了BLOB或者TEXT类型的列之外，<strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">其他所有的列（不包括隐藏列和记录头信息）占用的字节长度加起来不能超过65535个字节</strong>。为了存储一个VARCHAR(M)类型的列，其实需要占用3部分存储空间：</p>
<ul style="line-height: 160%; box-sizing: content-box; display: block; list-style-type: disc; padding-left: 30px; margin: 6px 0 10px; color: #333;">
<li style="line-height: 160%; box-sizing: content-box; position: relative;">真实数据占用字节的长度</li>
<li style="line-height: 160%; box-sizing: content-box; position: relative;">NULL标识，如果该列有NOT NULL属性则可以没有这部分存储空间</li>
<li style="line-height: 160%; box-sizing: content-box; position: relative;">真实数据</li>
</ul>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">假设一个记录只有一个VARCHAR（M）字段，则真实记录的长度列表最多需要2个字节，如果没有NOT NULL标识，则NULL值列表需要1个字节，那么真实数据最多只能存储65532个字节的数据。</p>
<ul style="line-height: 160%; box-sizing: content-box; display: block; list-style-type: disc; padding-left: 30px; margin: 6px 0 10px; color: #333;">
<li style="line-height: 160%; box-sizing: content-box; position: relative;">如果是ASCII字符集，则M最大值为65532；</li>
<li style="line-height: 160%; box-sizing: content-box; position: relative;">如果是GBK字符集，则M最大值为65532/2；</li>
<li style="line-height: 160%; box-sizing: content-box; position: relative;">如果是UTF-8字符集，则M最大值为65532/3；</li>
</ul>
<h4 style="line-height: 160%; box-sizing: content-box; font-size: 20px; color: #333;">3-2 记录中的数据太多产生的溢出</h4>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">MySQL中磁盘和内存交互的基本单位是页，也就是说MySQL是以页为基本单位来管理存储空间的，我们的记录都会被分配到某个页中存储。而一个页的大小一般是16KB，也就是16384字节，而一个VARCHAR(M)类型的列就最多可以存储65532个字节，这样就可能造成一个页存放不了一条记录的尴尬情况。</p>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">在Compact和Reduntant行格式中，对于占用存储空间非常大的列，在记录的真实数据处只会存储该列的一部分数据，把剩余的数据分散存储在几个其他的页中，然后记录的真实数据处用20个字节存储指向这些页的地址（当然这20个字节中还包括这些分散在其他页面中的数据的占用的字节数），从而可以找到剩余数据所在的页，如图所示：<img src="04-InnoDB记录存储结构_files/1 [3].jpg" type="image/jpeg" data-filename="1.jpg"/></p>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">从图中可以看出来，对于Compact和Reduntant行格式来说，如果某一列中的数据非常多的话，在本记录的真实数据处只会存储该列的前768个字节的数据和一个指向其他页的地址，然后把剩下的数据存放到其他页中，这个过程也叫做行溢出，存储超出768字节的那些页面也被称为溢出页。画一个简图就是这样：<img src="04-InnoDB记录存储结构_files/1 [4].jpg" type="image/jpeg" data-filename="1.jpg"/></p>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;"><strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">最后需要注意的是，不只是 VARCHAR(M) 类型的列，其他的 TEXT、BLOB 类型的列在存储数据非常多的时候也会发生行溢出。</strong></p>
<h4 style="line-height: 160%; box-sizing: content-box; font-size: 20px; color: #333;">3-3 行溢出的临界点</h4>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;"><strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">MySQL中规定一个页中至少存放两行记录</strong>，至于为什么这么规定我们之后再说，现在看一下这个规定造成的影响。以上边的varchar_size_demo表为例，它只有一个列c，我们往这个表中插入两条记录，每条记录最少插入多少字节的数据才会行溢出的现象呢？这得分析一下页中的空间都是如何利用的。</p>
<ul style="line-height: 160%; box-sizing: content-box; display: block; list-style-type: disc; padding-left: 30px; margin: 6px 0 10px; color: #333;">
<li style="line-height: 160%; box-sizing: content-box; position: relative;">
<p style="line-height: 160%; box-sizing: content-box; color: #333; margin: 0;">每个页除了存放我们的记录以外，也需要存储一些额外的信息，乱七八糟的额外信息加起来需要136个字节的空间（现在只要知道这个数字就好了），其他的空间都可以被用来存储记录。</p>
</li>
<li style="line-height: 160%; box-sizing: content-box; position: relative;">
<p style="line-height: 160%; box-sizing: content-box; color: #333; margin: 0;">每个记录需要的额外信息是27字节，这27个字节包括下边这些部分：</p>
<p style="line-height: 160%; box-sizing: content-box; color: #333; margin: 0;">2个字节用于存储真实数据的长度<br/>
1个字节用于存储列是否是NULL值<br/>
5个字节大小的头信息<br/>
6个字节的row_id列<br/>
6个字节的transaction_id列<br/>
7个字节的roll_pointer列</p>
</li>
</ul>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">假设一个列中存储的数据字节数为n，那么发生行溢出现象时需要满足这个式子：</p>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;"><strong style="line-height: 160%; box-sizing: content-box; font-weight: 700;">136 + 2×(27 + n) &gt; 16384</strong></p>
<p style="line-height: 160%; box-sizing: content-box; margin: 10px 0; color: #333;">求解这个式子得出的解是：n &gt; 8098。也就是说如果一个列中存储的数据不大于8098个字节，那就不会发生行溢出，否则就会发生行溢出。不过这个8098个字节的结论只是针对一个表中只有一个列的表来说的，如果表中有多个列，那上边的式子和结论都需要改一改了，所以重点就是：不用关注这个临界点是什么，只要知道如果我们想一个行中存储了很大的数据时，可能发生行溢出的现象。</p>
</div><center style="display:none !important;visibility:collapse !important;height:0 !important;white-space:nowrap;width:100%;overflow:hidden">%23%23%20InnoDB%E8%AE%B0%E5%BD%95%E5%AD%98%E5%82%A8%E7%BB%93%E6%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%0A%E7%94%B1%E4%BA%8ERedundant%E8%A1%8C%E6%A0%BC%E5%BC%8F%E6%AF%94%E8%BE%83%E8%80%81%EF%BC%8C%E8%BF%99%E9%87%8C%E5%B0%B1%E4%B8%8D%E8%AF%B4%E4%BA%86%EF%BC%8C%E4%B8%BB%E8%A6%81%E7%9C%8B%E5%85%B6%E4%BB%963%E7%A7%8D%EF%BC%9A%0A%0A%23%23%23%201.%20COMPACT%E8%A1%8C%E6%A0%BC%E5%BC%8F%0A%0A!%5Bee9f88c59b1641155675e1eebcbeabc7.jpeg%5D(en-resource%3A%2F%2Fdatabase%2F625%3A1)%0ACompact%E8%A1%8C%E6%A0%BC%E5%BC%8F%E4%B8%AD%EF%BC%8C%E4%B8%80%E6%9D%A1%E5%AE%8C%E6%95%B4%E7%9A%84%E8%AE%B0%E5%BD%95%E5%85%B6%E5%AE%9E%E5%8F%AF%E4%BB%A5%E8%A2%AB%E5%88%86%E4%B8%BA**%E8%AE%B0%E5%BD%95%E7%9A%84%E9%A2%9D%E5%A4%96%E4%BF%A1%E6%81%AF**%E5%92%8C**%E8%AE%B0%E5%BD%95%E7%9A%84%E7%9C%9F%E5%AE%9E%E6%95%B0%E6%8D%AE**%E4%B8%A4%E5%A4%A7%E9%83%A8%E5%88%86%E3%80%82%0A%0A%23%23%23%23%201-1%20%E8%AE%B0%E5%BD%95%E7%9A%84%E9%A2%9D%E5%A4%96%E4%BF%A1%E6%81%AF%0A%E8%BF%99%E9%83%A8%E5%88%86%E4%BF%A1%E6%81%AF%E6%98%AF%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%BA%E4%BA%86%E6%8F%8F%E8%BF%B0%E8%BF%99%E6%9D%A1%E8%AE%B0%E5%BD%95%E8%80%8C%E4%B8%8D%E5%BE%97%E4%B8%8D%E9%A2%9D%E5%A4%96%E6%B7%BB%E5%8A%A0%E7%9A%84%E4%B8%80%E4%BA%9B%E4%BF%A1%E6%81%AF%EF%BC%8C%E8%BF%99%E4%BA%9B%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E8%8A%82%E6%95%B0%E3%80%82%0A*%20%E5%A6%82%E6%9E%9CM%C3%97W%20%3E%20255%EF%BC%8C%E5%88%99%E5%88%86%E4%B8%BA%E4%B8%A4%E7%A7%8D%E6%83%85%E5%86%B5%EF%BC%9A%0A%20%20a.%20%E5%A6%82%E6%9E%9C%20L%20%3C%3D%20127%EF%BC%8C%E5%88%99%E7%94%A81%E4%B8%AA%E5%AD%97%E8%8A%82%E6%9D%A5%E8%A1%A8%E7%A4%BA%E7%9C%9F%E6%AD%A3%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%8D%A0%E7%94%A8%E7%9A%84%E5%AD%97%E8%8A%82%E6%95%B0%0A%20%20b.%20%E5%A6%82%E6%9E%9C%20L%20%3E%20127%EF%BC%8C%E5%88%99%E7%94%A82%E4%B8%AA%E5%AD%97%E8%8A%82%E6%9D%A5%E8%A1%A8%E7%A4%BA%E7%9C%9F%E6%AD%A3%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%8D%A0%E7%94%A8%E7%9A%84%E5%AD%97%E8%8A%82%E6%95%B0%0A!%5Bbed57c7a9343b508c2f0f00c6ec067b8.png%5D(en-resource%3A%2F%2Fdatabase%2F627%3A0)%0A%0A%23%23%23%23%23%201-1-2%20NULL%E5%80%BC%E5%88%97%E8%A1%A8%0A%0A%E6%9F%90%E4%BA%9B%E5%88%97%E5%8F%AF%E8%83%BD%E5%AD%98%E5%82%A8NULL%E5%80%BC%EF%BC%8C%E5%A6%82%E6%9E%9C%E6%8A%8A%E8%BF%99%E4%BA%9BNULL%E5%80%BC%E9%83%BD%E6%94%BE%E5%88%B0%E8%AE%B0%E5%BD%95%E7%9A%84%E7%9C%9F%E5%AE%9E%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%AD%98%E5%82%A8%E4%BC%9A%E5%BE%88%E5%8D%A0%E5%9C%B0%E6%96%B9%EF%BC%8C%E6%89%80%E4%BB%A5Compact%E8%A1%8C%E6%A0%BC%E5%BC%8F%E6%8A%8A%E8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E8%A1%A50%E3%80%82%0A%0A%23%23%23%23%23%201-1-3%20%E8%AE%B0%E5%BD%95%E5%A4%B4%E4%BF%A1%E6%81%AF%0A%0A**%E8%AE%B0%E5%BD%95%E5%A4%B4%E4%BF%A1%E6%81%AF%EF%BC%8C%E6%98%AF%E7%94%B1%E5%9B%BA%E5%AE%9A%E7%9A%845%E4%B8%AA%E5%AD%97%E8%8A%82%E7%BB%84%E6%88%90%E3%80%825%E4%B8%AA%E5%AD%97%E8%8A%82%E4%B9%9F%E5%B0%B1%E6%98%AF40%E4%B8%AA%E4%BA%8C%E8%BF%9B%E5%88%B6%E4%BD%8D%EF%BC%8C%E4%B8%8D%E5%90%8C%E7%9A%84%E4%BD%8D%E4%BB%A3%E8%A1%A8%E4%B8%8D%E5%90%8C%E7%9A%84%E6%84%8F%E6%80%9D%EF%BC%8C%E5%A6%82%E5%9B%BE%EF%BC%9A**%0A!%5Bd79a8b3c05505bc2be31a4e09ba77aa3.jpeg%5D(en-resource%3A%2F%2Fdatabase%2F629%3A0)%0A!%5B6b2eb8d99eddb73449a71980b52cc919.jpeg%5D(en-resource%3A%2F%2Fdatabase%2F631%3A0)%0A%0A%0A%23%23%23%23%201-2%20%E8%AE%B0%E5%BD%95%E7%9A%84%E7%9C%9F%E5%AE%9E%E6%95%B0%E6%8D%AE%0A%0A%E8%AE%B0%E5%BD%95%E7%9A%84%E7%9C%9F%E5%AE%9E%E6%95%B0%E6%8D%AE%E9%99%A4%E4%BA%86%E7%94%A8%E6%88%B7%E8%87%AA%E5%AE%9A%E4%B9%89%E7%9A%84%E5%88%97%E7%9A%84%E6%95%B0%E6%8D%AE%E4%BB%A5%E5%A4%96%EF%BC%8CMySQL%E4%BC%9A%E4%B8%BA%E6%AF%8F%E4%B8%AA%E8%AE%B0%E5%BD%95%E9%BB%98%E8%AE%A4%E6%B7%BB%E5%8A%A0%E4%B8%80%E4%BA%9B%E5%88%97%EF%BC%88%E4%B9%9F%E7%A7%B0%E4%B8%BA**%E9%9A%90%E8%97%8F%E5%88%97**%EF%BC%89%EF%BC%8C%E5%85%B7%E4%BD%93%E7%9A%84%E5%88%97%E5%A6%82%E4%B8%8B%EF%BC%9A%0A%0A%7C%20%E5%88%97%E5%90%8D%20%7C%20%E6%98%AF%E5%90%A6%E5%BF%85%E9%A1%BB%20%7C%20%E5%8D%A0%E7%94%A8%E7%A9%BA%E9%97%B4%20%7C%20%E6%8F%8F%E8%BF%B0%20%7C%0A%7C%20---%20%7C%20---%20%7C%20---%20%7C%20---%20%7C%0A%7C%20DB_ROW_ID%20%7C%20%E5%90%A6%20%7C%206%E5%AD%97%E8%8A%82%20%7C%20%E8%A1%8CID%EF%BC%8C%E5%94%AF%E4%B8%80%E6%A0%87%E8%AF%86%E4%B8%80%E6%9D%A1%E8%AE%B0%E5%BD%95%20%7C%0A%7C%20DB_TRX_ID%20%7C%20%E6%98%AF%20%7C%206%E5%AD%97%E8%8A%82%20%7C%20%E4%BA%8B%E5%8A%A1ID%20%7C%0A%7C%20DB_ROLL_PTR%20%7C%20%E6%98%AF%20%7C%207%E5%AD%97%E8%8A%82%20%7C%20%E5%9B%9E%E6%BB%9A%E6%8C%87%E9%92%88%20%7C%0A%0AInnoDB%E8%A1%A8%E5%AF%B9%E4%B8%BB%E9%94%AE%E7%9A%84%E7%94%9F%E6%88%90%E7%AD%96%E7%95%A5%EF%BC%9A%E4%BC%98%E5%85%88%E4%BD%BF%E7%94%A8%E7%94%A8%E6%88%B7%E8%87%AA%E5%AE%9A%E4%B9%89%E4%B8%BB%E9%94%AE%E4%BD%9C%E4%B8%BA%E4%B8%BB%E9%94%AE%EF%BC%8C%E5%A6%82%E6%9E%9C%E7%94%A8%E6%88%B7%E6%B2%A1%E6%9C%89%E5%AE%9A%E4%B9%89%E4%B8%BB%E9%94%AE%EF%BC%8C%E5%88%99%E9%80%89%E5%8F%96%E4%B8%80%E4%B8%AA%E9%9D%9E%E7%A9%BA%E7%9A%84Unique%E9%94%AE%E4%BD%9C%E4%B8%B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%A1%B5%E9%9D%A2%E7%9A%84%E5%9C%B0%E5%9D%80%EF%BC%8C%E5%B0%B1%E5%83%8F%E8%BF%99%E6%A0%B7%EF%BC%9A%0A!%5Bfee0f795abc9da761da68a82d7b8e209.jpeg%5D(en-resource%3A%2F%2Fdatabase%2F633%3A0)%0A%0ACompressed%E8%A1%8C%E6%A0%BC%E5%BC%8F%E5%92%8CDynamic%E4%B8%8D%E5%90%8C%E7%9A%84%E4%B8%80%E7%82%B9%E6%98%AF%EF%BC%8CCompressed%E8%A1%8C%E6%A0%BC%E5%BC%8F%E4%BC%9A%E9%87%87%E7%94%A8%E5%8E%8B%E7%BC%A9%E7%AE%97%E6%B3%95%E5%AF%B9%E9%A1%B5%E9%9D%A2%E8%BF%9B%E8%A1%8C%E5%8E%8B%E7%BC%A9%EF%BC%8C%E4%BB%A5%E8%8A%82%E7%9C%81%E7%A9%BA%E9%97%B4%E3%80%82%0A%0A%0A%23%23%23%203.%20%E8%A1%8C%E6%BA%A2%E5%87%BA%E6%95%B0%E6%8D%AE%0A%0A%23%23%23%23%203-1%20VARCHAR%EF%BC%88M%EF%BC%89%E6%9C%80%E5%A4%9A%E8%83%BD%E5%AD%98%E5%82%A8%E7%9A%84%E6%95%B0%E6%8D%AE%0A%0AMySQL**%E5%AF%B9%E4%B8%80%E6%9D%A1%E8%AE%B0%E5%BD%95%E5%8D%A0%E7%94%A8%E7%9A%84%E6%9C%80%E5%A4%A7%E5%AD%98%E5%82%A8%E7%A9%BA%E9%97%B4%E6%98%AF%E6%9C%89%E9%99%90%E5%88%B6%E7%9A%84**%EF%BC%8C%E9%99%A4%E4%BA%86BLOB%E6%88%96%E8%80%85TEXT%E7%B1%BB%E5%9E%8B%E7%9A%84%E5%88%97%E4%B9%8B%E5%A4%96%EF%BC%8C**%E5%85%B6%E4%BB%96%E6%89%80%E6%9C%89%E7%9A%84%E5%88%97%EF%BC%88%E4%B8%8D%E5%8C%85%E6%8B%AC%E9%9A%90%E8%97%8F%E5%88%97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95%E7%9A%84%E7%9C%9F%E5%AE%9E%E6%95%B0%E6%8D%AE%E5%A4%84%E5%8F%AA%E4%BC%9A%E5%AD%98%E5%82%A8%E8%AF%A5%E5%88%97%E7%9A%84%E4%B8%80%E9%83%A8%E5%88%86%E6%95%B0%E6%8D%AE%EF%BC%8C%E6%8A%8A%E5%89%A9%E4%BD%99%E7%9A%84%E6%95%B0%E6%8D%AE%E5%88%86%E6%95%A3%E5%AD%98%E5%82%A8%E5%9C%A8%E5%87%A0%E4%B8%AA%E5%85%B6%E4%BB%96%E7%9A%84%E9%A1%B5%E4%B8%AD%EF%BC%8C%E7%84%B6%E5%90%8E%E8%AE%B0%E5%BD%95%E7%9A%84%E7%9C%9F%E5%AE%9E%E6%95%B0%E6%8D%AE%E5%A4%84%E7%94%A820%E4%B8%AA%E5%AD%97%E8%8A%82%E5%AD%98%E5%82%A8%E6%8C%87%E5%90%91%E8%BF%99%E4%BA%9B%E9%A1%B5%E7%9A%84%E5%9C%B0%E5%9D%80%EF%BC%88%E5%BD%93%E7%84%B6%E8%BF%9920%E4%B8%AA%E5%AD%97%E8%8A%82%E4%B8%AD%E8%BF%98%E5%8C%85%E6%8B%AC%E8%BF%99%E4%BA%9B%E5%88%86%E6%95%A3%E5%9C%A8%E5%85%B6%E4%BB%96%E9%A1%B5%E9%9D%A2%E4%B8%AD%E7%9A%84%E6%95%B0%E6%8D%AE%E7%9A%84%E5%8D%A0%E7%94%A8%E7%9A%84%E5%AD%97%E8%8A%82%E6%95%B0%EF%BC%89%EF%BC%8C%E4%BB%8E%E8%80%8C%E5%8F%AF%E4%BB%A5%E6%89%BE%E5%88%B0%E5%89%A9%E4%BD%99%E6%95%B0%E6%8D%AE%E6%89%80%E5%9C%A8%E7%9A%84%E9%A1%B5%EF%BC%8C%E5%A6%82%E5%9B%BE%E6%89%80%E7%A4%BA%EF%BC%9A!%5B29b3d0dd3a6de8039a644ebde3b99f77.jpeg%5D(en-resource%3A%2F%2Fdatabase%2F635%3A0)%0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%B4%EF%BC%88%E7%8E%B0%E5%9C%A8%E5%8F%AA%E8%A6%81%E7%9F%A5%E9%81%93%E8%BF%99%E4%B8%AA%E6%95%B0%E5%AD%97%E5%B0%B1%E5%A5%BD%E4%BA%86%EF%BC%89%EF%BC%8C%E5%85%B6%E4%BB%96%E7%9A%84%E7%A9%BA%E9%97%B4%E9%83%BD%E5%8F%AF%E4%BB%A5%E8%A2%AB%E7%94%A8%E6%9D%A5%E5%AD%98%E5%82%A8%E8%AE%B0%E5%BD%95%E3%80%82%0A*%20%E6%AF%8F%E4%B8%AA%E8%AE%B0%E5%BD%95%E9%9C%80%E8%A6%81%E7%9A%84%E9%A2%9D%E5%A4%96%E4%BF%A1%E6%81%AF%E6%98%AF27%E5%AD%97%E8%8A%82%EF%BC%8C%E8%BF%9927%E4%B8%AA%E5%AD%97%E8%8A%82%E5%8C%85%E6%8B%AC%E4%B8%8B%E8%BE%B9%E8%BF%99%E4%BA%9B%E9%83%A8%E5%88%86%EF%BC%9A%0A%20%20%20%20%0A%20%20%20%202%E4%B8%AA%E5%AD%97%E8%8A%82%E7%94%A8%E4%BA%8E%E5%AD%98%E5%82%A8%E7%9C%9F%E5%AE%9E%E6%95%B0%E6%8D%AE%E7%9A%84%E9%95%BF%E5%BA%A6%0A%20%20%20%201%E4%B8%AA%E5%AD%97%E8%8A%82%E7%94%A8%E4%BA%8E%E5%AD%98%E5%82%A8%E5%88%97%E6%98%AF%E5%90%A6%E6%98%AFNULL%E5%80%BC%0A%20%20%20%205%E4%B8%AA%E5%AD%97%E8%8A%82%E5%A4%A7%E5%B0%8F%E7%9A%84%E5%A4%B4%E4%BF%A1%E6%81%AF%0A%20%20%20%206%E4%B8%AA%E5%AD%97%E8%8A%82%E7%9A%84row_id%E5%88%97%0A%20%20%20%206%E4%B8%AA%E5%AD%97%E8%8A%82%E7%9A%84transaction_id%E5%88%97%0A%20%20%20%207%E4%B8%AA%E5%AD%97%E8%8A%82%E7%9A%84roll_pointer%E5%88%97%0A%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